package cn.yangliu.work;

import cn.yangliu.entity.PayOrderInfo;

import javax.servlet.http.HttpServletRequest;

public class PayBeforeWorkHandler {
    private PayOrderInfo payOrderInfo;
    private HttpServletRequest request;

    public PayBeforeWorkHandler(PayOrderInfo payOrderInfo, HttpServletRequest request) {
        this.payOrderInfo = payOrderInfo;
        this.request = request;
    }

    public void doWork(PayBeforeWorker... workers) {
        for (PayBeforeWorker worker : workers) {
            worker.toDo(payOrderInfo, request);
        }
    }

}
